//
//  RTJContractController.m
//  RuiTaiJinProject
//
//  Created by jayson on 2018/12/3.
//  Copyright © 2018年 leewei. All rights reserved.
//

#import "RTJContractController.h"

@interface RTJContractController ()

@property (weak, nonatomic) IBOutlet UILabel *contentLab;

@end

@implementation RTJContractController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    if (_content.length!=0) {
        
        _contentLab.attributedText = [self getAttributedStringWithString:_content lineSpace:0];

    }
    
    
}

-(NSAttributedString *)getAttributedStringWithString:(NSString *)string lineSpace:(CGFloat)lineSpace {
    
    NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:string];
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    paragraphStyle.lineSpacing = lineSpace; // 调整行间距
    NSRange range = NSMakeRange(0, [string length]);
    [attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:range];
    return attributedString;
}

- (IBAction)jieshishu:(id)sender {
    
    RTJHTMLViewController *vc = [[RTJHTMLViewController alloc]init];
    vc.title =@"风险揭示书";
    vc.htmlStr =  @"fengxianjiesishu";
    [self.navigationController pushViewController:vc animated:YES];
    
}


@end
